<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ page import="java.util.List"%>
<%@ page import="java.util.Calendar"%>
<%@ page import="java.text.SimpleDateFormat"%>
<link rel="stylesheet" href="${ path }/dwz/FusionCharts/Contents/Style.css" type="text/css" />
<script type="text/javascript" src="${ path }/dwz/FusionCharts/JSClass/FusionCharts.js"></script>
<script type="text/javascript">

function changeProduct() {
	var ids = '';
	var count = 0;
	var status = '';
	$('input:checkbox[name="ids"]:checked',navTab.getCurrentPanel()).each(function(i, n) {
		ids = n.value;
		count += count+1;
	});
	if(count == 0) {
		alert('请选择你要变更的信息！');
		return ;
	}
	else if(count > 1) {
		alert('只能选择一条信息进行变更！');
		return ;		
	}else{
		 	var navTabId = navTab._getTabs().filter('.selected').attr('tabid');
			navTab.openTab("listproduct", "../xyxyDown/teaProgramAction!modifyTeaProgram.action?id="+ids+"&navTabId="+navTabId, { title:"变更", fresh:false, data:{} });
	}
	
	}
	
function submitForm(){
	var flag = false;
	$(".required",navTab.getCurrentPanel()).each(function(){
		if($(this).val()==""){
			$(this).focus();
			flag = true;
		}
	});
	if(flag){
		alert("您有必选项没有填写请确认");
		return false;
	}
	$("#pagerFindForm",navTab.getCurrentPanel()).submit();
}
</script>
<div class="pageHeader">
	<form id="pagerFindForm" onsubmit="if(this.action != '${path }/statistics/queryaction!queryReport.action'){this.action = '${path }/statistics/queryaction!queryReport.action' ;};return navTabSearch(this); " action="${path }/statistics/queryaction!queryReport.action" method="post" class="pageForm required-validate" rel="pagerForm">
	<div class="searchBar">
	  <table class="pageFormContent">
		<tr>
		<td>
						<label>
							标题：
						</label>
						<input type="text" name="filter_and_title_LIKE_S"
							value="${filter_and_title_LIKE_S }" />
					</td>
			<td>
				<label>创建时间：</label>
				<input type="text" name="filter_and_createTime_GE_T"  id="d2111" style="width: 170px;" onFocus="WdatePicker({minDate:'2010-01-01',maxDate:'#F{$dp.$D(\'d2112\')}'})" class="required" readonly="readonly" value="${actionMap['filter_and_createTime_GE_T']}" /><a class="inputDateButton" href="javascript:;" >选择</a>
			</td>
			<td>
				<label>至：</label>
				<input type="text" name="filter_and_createTime_LE_T" id="d2112" style="width: 170px;" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'d2111\')}'})" readonly="readonly" value="${actionMap['filter_and_createTime_LE_T']}" /><a class="inputDateButton" href="javascript:;">选择</a>
				<input type="hidden" name="configId" value="${actionMap['configId'] }">
			</td>
          <td width="100px;">
           <div class="subBar">
            <ul>
			  <li><div class="buttonActive"><div class="buttonContent"><button type="button" onclick="submitForm()">查找</button></div></div></li>
			  <li><div class="buttonActive"><div class="buttonContent"><button type="button" id="clearText">重置</button></div></div></li>
			</ul>
			</div>
		  </td>
		</tr>
	  </table>
	</div>
	</form>
  </div>
	<div class="tabs">
		
    <div class="tabsContent" style="background-color:#FFF">
	<div style="width:100%">
		<div id="jbsxBox" class="unitBox">
			<div class="pageContent">
				<div class="panelBar">
					<jsp:include page="/common/pagination.jsp" />
					<ul class="toolBar">
					<li><a class="add" href="${path }/xyxyDown/teaProgramAction!addTeaProgram.action" target="navTab"><span>添加</span></a></li>
					<li><a class="delete" href="${path}/xyxyDown/teaProgramAction!deleteTeaProgram.action"  rel="ids" postType="string" title="确定要删除吗?" target="selectedTodo"><span>删除</span></a></li>
					
					</ul>
				</div>					
				<table class="list" width="100%" layoutH="156" id = "exportTable"> 
				   <thead>
					<tr>
						<th>序号</th>
					    <th export = "true" columnIndex = "0" columnChName = "标题">标题</th> 
					    <th export = "true" columnIndex = "1" columnChName = "创建日期">创建日期</th>
					    <th export = "true" columnIndex = "2" columnChName = "添加人">添加人</th> 
					    <th export = "true" columnIndex = "3" columnChName = "所属类别">所属类别</th>
					</tr>
				  </thead>
				  <tbody>
					<c:forEach items="${page.results }" var="teaprogram" varStatus="status">
					  <tr>
					  	<td><input type="checkbox" name="ids" value="${ teaprogram[0] }" >${status.count }</td>
						<td align="center">
						<a href="${ path }/xyxyDown/teaProgramAction!browTeaProgram.action?id=${teaprogram[0] }"  target="navTab">
						${teaprogram[1] }</td>
						<td align="center">${teaprogram[2]}</td>
						<td align="center">${teaprogram[3] }</td>
						<td align="center">
						<hpin:id2nameDB beanId="org.hpin.base.dict.dao.SysDictTypeDao" id="${teaprogram[4] }"/>
						 </td>
					  </tr>
					</c:forEach>
					</tbody>
				  </table>
			  </div>
		</div>
	</div>
	

  </div>
</div>